<?php

namespace App\Http\Controllers\Api\qyf;

use App\Http\Controllers\Controller;
use App\Utils\Thirdparty\Map\Amap;
use Illuminate\Http\Request;

class Maps extends Controller
{
    //获取地址
    function address(Request  $request){
      $map= new Amap();
     return $map->position($request->ip());
    }
    //获取经纬度
    function getLocation(Request $request){
       $address= (string) $request->post('address');
        $map= new Amap();
      return  $map->getLocation($address);
    }
}
